import 'package:flutter/material.dart';
import 'package:name_card_android/constant/image_constant.dart';

class PersonCard extends StatelessWidget {
  const PersonCard({Key? key}) : super(key: key);

  @override
  
  Widget build(BuildContext context) {    
    return InkWell(
      onTap: () {
         Navigator.pushNamed(context, '/setting');
      },
      child: Container(
        width: double.infinity,
        constraints: const BoxConstraints(
          minHeight: 100,
        ),
        margin: const EdgeInsets.symmetric(horizontal: 15),
        decoration:  BoxDecoration(
          image: DecorationImage(
              image: Image.network(ImageConstant.personCardBackground).image,
              fit: BoxFit.cover,
            ),
          borderRadius: BorderRadius.circular(16),
        ),
              
        child:  Padding(
          padding: const EdgeInsets.all(10.0),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,        
            children:  [
              Text(
                'Company Name',          
                style: TextStyle(
                  fontSize: 14,
                  color: Theme.of(context).textTheme.bodyMedium!.color
                ),
              ),
              const SizedBox(height: 10),
              Text(
                'John Doe',
                style: TextStyle(fontSize: 24, color: Theme.of(context).textTheme.bodyLarge!.color),
              ),
              const SizedBox(height: 10),
              Text(
                'Position',
                style: TextStyle(fontSize: 14, color: Theme.of(context).textTheme.bodyMedium!.color)),
              
              const SizedBox(height: 10),
              Text(
                'City',
                style: TextStyle(fontSize: 14, color: Theme.of(context).textTheme.bodyMedium!.color),
              ),
            ],          
          ),
        ),
      ),
      );
  }
}